package com.xintai.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xintai.system.mapper.PubCoderuleMapper;
import com.xintai.system.domain.PubCoderule;
import com.xintai.system.service.IPubCoderuleService;

/**
 * 单据编号规则Service业务层处理
 * 
 * @author xintai
 * @date 2021-01-09
 */
@Service
public class PubCoderuleServiceImpl implements IPubCoderuleService 
{
    @Autowired
    private PubCoderuleMapper pubCoderuleMapper;

    /**
     * 查询单据编号规则
     * 
     * @param crId 单据编号规则ID
     * @return 单据编号规则
     */
    @Override
    public PubCoderule selectPubCoderuleById(Long crId)
    {
        return pubCoderuleMapper.selectPubCoderuleById(crId);
    }

    /**
     * 查询单据编号规则列表
     * 
     * @param pubCoderule 单据编号规则
     * @return 单据编号规则
     */
    @Override
    public List<PubCoderule> selectPubCoderuleList(PubCoderule pubCoderule)
    {
        return pubCoderuleMapper.selectPubCoderuleList(pubCoderule);
    }

    /**
     * 新增单据编号规则
     * 
     * @param pubCoderule 单据编号规则
     * @return 结果
     */
    @Override
    public int insertPubCoderule(PubCoderule pubCoderule)
    {
        return pubCoderuleMapper.insertPubCoderule(pubCoderule);
    }

    /**
     * 修改单据编号规则
     * 
     * @param pubCoderule 单据编号规则
     * @return 结果
     */
    @Override
    public int updatePubCoderule(PubCoderule pubCoderule)
    {
        return pubCoderuleMapper.updatePubCoderule(pubCoderule);
    }

    /**
     * 批量删除单据编号规则
     * 
     * @param crIds 需要删除的单据编号规则ID
     * @return 结果
     */
    @Override
    public int deletePubCoderuleByIds(Long[] crIds)
    {
        return pubCoderuleMapper.deletePubCoderuleByIds(crIds);
    }

    /**
     * 删除单据编号规则信息
     * 
     * @param crId 单据编号规则ID
     * @return 结果
     */
    @Override
    public int deletePubCoderuleById(Long crId)
    {
        return pubCoderuleMapper.deletePubCoderuleById(crId);
    }
}
